﻿///////////////////////////////////////////////////////////////
// This is generated code. 
//////////////////////////////////////////////////////////////
// Code is generated using LLBLGen Pro version: 2.6
// Code is generated on: Tuesday, April 08, 2014 5:21:31 PM
// Code is generated using templates: SD.TemplateBindings.SqlServerSpecific.NET20
// Templates vendor: Solutions Design.
// Templates version: 
//////////////////////////////////////////////////////////////
using System;
using System.Collections;
using System.Data;

using SD.LLBLGen.Pro.ORMSupportClasses;

namespace TuanHuy.DAL.DatabaseSpecific
{
	/// <summary>
	/// Singleton implementation of the PersistenceInfoProvider. This class is the singleton wrapper through which the actual instance is retrieved.
	/// </summary>
	/// <remarks>It uses a single instance of an internal class. The access isn't marked with locks as the PersistenceInfoProviderBase class is threadsafe.</remarks>
	internal sealed class PersistenceInfoProviderSingleton
	{
		#region Class Member Declarations
		private static readonly IPersistenceInfoProvider _providerInstance = new PersistenceInfoProviderCore();
		#endregion
		
		/// <summary>private ctor to prevent instances of this class.</summary>
		private PersistenceInfoProviderSingleton()
		{
		}

		/// <summary>Dummy static constructor to make sure threadsafe initialization is performed.</summary>
		static PersistenceInfoProviderSingleton()
		{
		}

		/// <summary>Gets the singleton instance of the PersistenceInfoProviderCore</summary>
		/// <returns>Instance of the PersistenceInfoProvider.</returns>
		public static IPersistenceInfoProvider GetInstance()
		{
			return _providerInstance;
		}
	}

	/// <summary>Actual implementation of the PersistenceInfoProvider. Used by singleton wrapper.</summary>
	internal class PersistenceInfoProviderCore : PersistenceInfoProviderBase
	{
		/// <summary>Initializes a new instance of the <see cref="PersistenceInfoProviderCore"/> class.</summary>
		internal PersistenceInfoProviderCore()
		{
			Init();
		}

		/// <summary>Method which initializes the internal datastores with the structure of hierarchical types.</summary>
		private void Init()
		{
			base.InitClass((13 + 0));
			InitAspnetApplicationsEntityMappings();
			InitAspnetMembershipEntityMappings();
			InitAspnetSchemaVersionsEntityMappings();
			InitAspnetUsersEntityMappings();
			InitCategoryEntityMappings();
			InitGalleriesEntityMappings();
			InitGalleryCategoryEntityMappings();
			InitLanguageEntityMappings();
			InitProductsEntityMappings();
			InitProductsLanguageEntityMappings();
			InitProjectCatogeryEntityMappings();
			InitProjectsEntityMappings();
			InitProjectsLanguageEntityMappings();

		}


		/// <summary>Inits AspnetApplicationsEntity's mappings</summary>
		private void InitAspnetApplicationsEntityMappings()
		{
			base.AddElementMapping( "AspnetApplicationsEntity", "TuanHuy", @"dbo", "aspnet_Applications", 4 );
			base.AddElementFieldMapping( "AspnetApplicationsEntity", "ApplicationName", "ApplicationName", false, (int)SqlDbType.NVarChar, 256, 0, 0, false, "", null, typeof(System.String), 0 );
			base.AddElementFieldMapping( "AspnetApplicationsEntity", "LoweredApplicationName", "LoweredApplicationName", false, (int)SqlDbType.NVarChar, 256, 0, 0, false, "", null, typeof(System.String), 1 );
			base.AddElementFieldMapping( "AspnetApplicationsEntity", "ApplicationId", "ApplicationId", false, (int)SqlDbType.UniqueIdentifier, 0, 0, 0, false, "", null, typeof(System.Guid), 2 );
			base.AddElementFieldMapping( "AspnetApplicationsEntity", "Description", "Description", true, (int)SqlDbType.NVarChar, 256, 0, 0, false, "", null, typeof(System.String), 3 );
		}
		/// <summary>Inits AspnetMembershipEntity's mappings</summary>
		private void InitAspnetMembershipEntityMappings()
		{
			base.AddElementMapping( "AspnetMembershipEntity", "TuanHuy", @"dbo", "aspnet_Membership", 21 );
			base.AddElementFieldMapping( "AspnetMembershipEntity", "ApplicationId", "ApplicationId", false, (int)SqlDbType.UniqueIdentifier, 0, 0, 0, false, "", null, typeof(System.Guid), 0 );
			base.AddElementFieldMapping( "AspnetMembershipEntity", "UserId", "UserId", false, (int)SqlDbType.UniqueIdentifier, 0, 0, 0, false, "", null, typeof(System.Guid), 1 );
			base.AddElementFieldMapping( "AspnetMembershipEntity", "Password", "Password", false, (int)SqlDbType.NVarChar, 128, 0, 0, false, "", null, typeof(System.String), 2 );
			base.AddElementFieldMapping( "AspnetMembershipEntity", "PasswordFormat", "PasswordFormat", false, (int)SqlDbType.Int, 0, 0, 10, false, "", null, typeof(System.Int32), 3 );
			base.AddElementFieldMapping( "AspnetMembershipEntity", "PasswordSalt", "PasswordSalt", false, (int)SqlDbType.NVarChar, 128, 0, 0, false, "", null, typeof(System.String), 4 );
			base.AddElementFieldMapping( "AspnetMembershipEntity", "MobilePin", "MobilePIN", true, (int)SqlDbType.NVarChar, 16, 0, 0, false, "", null, typeof(System.String), 5 );
			base.AddElementFieldMapping( "AspnetMembershipEntity", "Email", "Email", true, (int)SqlDbType.NVarChar, 256, 0, 0, false, "", null, typeof(System.String), 6 );
			base.AddElementFieldMapping( "AspnetMembershipEntity", "LoweredEmail", "LoweredEmail", true, (int)SqlDbType.NVarChar, 256, 0, 0, false, "", null, typeof(System.String), 7 );
			base.AddElementFieldMapping( "AspnetMembershipEntity", "PasswordQuestion", "PasswordQuestion", true, (int)SqlDbType.NVarChar, 256, 0, 0, false, "", null, typeof(System.String), 8 );
			base.AddElementFieldMapping( "AspnetMembershipEntity", "PasswordAnswer", "PasswordAnswer", true, (int)SqlDbType.NVarChar, 128, 0, 0, false, "", null, typeof(System.String), 9 );
			base.AddElementFieldMapping( "AspnetMembershipEntity", "IsApproved", "IsApproved", false, (int)SqlDbType.Bit, 0, 0, 0, false, "", null, typeof(System.Boolean), 10 );
			base.AddElementFieldMapping( "AspnetMembershipEntity", "IsLockedOut", "IsLockedOut", false, (int)SqlDbType.Bit, 0, 0, 0, false, "", null, typeof(System.Boolean), 11 );
			base.AddElementFieldMapping( "AspnetMembershipEntity", "CreateDate", "CreateDate", false, (int)SqlDbType.DateTime, 0, 0, 0, false, "", null, typeof(System.DateTime), 12 );
			base.AddElementFieldMapping( "AspnetMembershipEntity", "LastLoginDate", "LastLoginDate", false, (int)SqlDbType.DateTime, 0, 0, 0, false, "", null, typeof(System.DateTime), 13 );
			base.AddElementFieldMapping( "AspnetMembershipEntity", "LastPasswordChangedDate", "LastPasswordChangedDate", false, (int)SqlDbType.DateTime, 0, 0, 0, false, "", null, typeof(System.DateTime), 14 );
			base.AddElementFieldMapping( "AspnetMembershipEntity", "LastLockoutDate", "LastLockoutDate", false, (int)SqlDbType.DateTime, 0, 0, 0, false, "", null, typeof(System.DateTime), 15 );
			base.AddElementFieldMapping( "AspnetMembershipEntity", "FailedPasswordAttemptCount", "FailedPasswordAttemptCount", false, (int)SqlDbType.Int, 0, 0, 10, false, "", null, typeof(System.Int32), 16 );
			base.AddElementFieldMapping( "AspnetMembershipEntity", "FailedPasswordAttemptWindowStart", "FailedPasswordAttemptWindowStart", false, (int)SqlDbType.DateTime, 0, 0, 0, false, "", null, typeof(System.DateTime), 17 );
			base.AddElementFieldMapping( "AspnetMembershipEntity", "FailedPasswordAnswerAttemptCount", "FailedPasswordAnswerAttemptCount", false, (int)SqlDbType.Int, 0, 0, 10, false, "", null, typeof(System.Int32), 18 );
			base.AddElementFieldMapping( "AspnetMembershipEntity", "FailedPasswordAnswerAttemptWindowStart", "FailedPasswordAnswerAttemptWindowStart", false, (int)SqlDbType.DateTime, 0, 0, 0, false, "", null, typeof(System.DateTime), 19 );
			base.AddElementFieldMapping( "AspnetMembershipEntity", "Comment", "Comment", true, (int)SqlDbType.NText, 1073741823, 0, 0, false, "", null, typeof(System.String), 20 );
		}
		/// <summary>Inits AspnetSchemaVersionsEntity's mappings</summary>
		private void InitAspnetSchemaVersionsEntityMappings()
		{
			base.AddElementMapping( "AspnetSchemaVersionsEntity", "TuanHuy", @"dbo", "aspnet_SchemaVersions", 3 );
			base.AddElementFieldMapping( "AspnetSchemaVersionsEntity", "Feature", "Feature", false, (int)SqlDbType.NVarChar, 128, 0, 0, false, "", null, typeof(System.String), 0 );
			base.AddElementFieldMapping( "AspnetSchemaVersionsEntity", "CompatibleSchemaVersion", "CompatibleSchemaVersion", false, (int)SqlDbType.NVarChar, 128, 0, 0, false, "", null, typeof(System.String), 1 );
			base.AddElementFieldMapping( "AspnetSchemaVersionsEntity", "IsCurrentVersion", "IsCurrentVersion", false, (int)SqlDbType.Bit, 0, 0, 0, false, "", null, typeof(System.Boolean), 2 );
		}
		/// <summary>Inits AspnetUsersEntity's mappings</summary>
		private void InitAspnetUsersEntityMappings()
		{
			base.AddElementMapping( "AspnetUsersEntity", "TuanHuy", @"dbo", "aspnet_Users", 7 );
			base.AddElementFieldMapping( "AspnetUsersEntity", "ApplicationId", "ApplicationId", false, (int)SqlDbType.UniqueIdentifier, 0, 0, 0, false, "", null, typeof(System.Guid), 0 );
			base.AddElementFieldMapping( "AspnetUsersEntity", "UserId", "UserId", false, (int)SqlDbType.UniqueIdentifier, 0, 0, 0, false, "", null, typeof(System.Guid), 1 );
			base.AddElementFieldMapping( "AspnetUsersEntity", "UserName", "UserName", false, (int)SqlDbType.NVarChar, 256, 0, 0, false, "", null, typeof(System.String), 2 );
			base.AddElementFieldMapping( "AspnetUsersEntity", "LoweredUserName", "LoweredUserName", false, (int)SqlDbType.NVarChar, 256, 0, 0, false, "", null, typeof(System.String), 3 );
			base.AddElementFieldMapping( "AspnetUsersEntity", "MobileAlias", "MobileAlias", true, (int)SqlDbType.NVarChar, 16, 0, 0, false, "", null, typeof(System.String), 4 );
			base.AddElementFieldMapping( "AspnetUsersEntity", "IsAnonymous", "IsAnonymous", false, (int)SqlDbType.Bit, 0, 0, 0, false, "", null, typeof(System.Boolean), 5 );
			base.AddElementFieldMapping( "AspnetUsersEntity", "LastActivityDate", "LastActivityDate", false, (int)SqlDbType.DateTime, 0, 0, 0, false, "", null, typeof(System.DateTime), 6 );
		}
		/// <summary>Inits CategoryEntity's mappings</summary>
		private void InitCategoryEntityMappings()
		{
			base.AddElementMapping( "CategoryEntity", "TuanHuy", @"dbo", "Category", 2 );
			base.AddElementFieldMapping( "CategoryEntity", "CategoryId", "CategoryId", false, (int)SqlDbType.Int, 0, 0, 10, true, "SCOPE_IDENTITY()", null, typeof(System.Int32), 0 );
			base.AddElementFieldMapping( "CategoryEntity", "CategoryName", "CategoryName", true, (int)SqlDbType.NVarChar, 250, 0, 0, false, "", null, typeof(System.String), 1 );
		}
		/// <summary>Inits GalleriesEntity's mappings</summary>
		private void InitGalleriesEntityMappings()
		{
			base.AddElementMapping( "GalleriesEntity", "TuanHuy", @"dbo", "GALLERIES", 4 );
			base.AddElementFieldMapping( "GalleriesEntity", "Id", "ID", false, (int)SqlDbType.Decimal, 0, 0, 10, false, "", null, typeof(System.Decimal), 0 );
			base.AddElementFieldMapping( "GalleriesEntity", "Image", "IMAGE", true, (int)SqlDbType.NVarChar, 500, 0, 0, false, "", null, typeof(System.String), 1 );
			base.AddElementFieldMapping( "GalleriesEntity", "Type", "TYPE", false, (int)SqlDbType.NVarChar, 250, 0, 0, false, "", null, typeof(System.String), 2 );
			base.AddElementFieldMapping( "GalleriesEntity", "ObjectId", "ObjectID", true, (int)SqlDbType.Decimal, 0, 0, 10, false, "", null, typeof(System.Decimal), 3 );
		}
		/// <summary>Inits GalleryCategoryEntity's mappings</summary>
		private void InitGalleryCategoryEntityMappings()
		{
			base.AddElementMapping( "GalleryCategoryEntity", "TuanHuy", @"dbo", "GalleryCategory", 2 );
			base.AddElementFieldMapping( "GalleryCategoryEntity", "CatogeryId", "CatogeryId", false, (int)SqlDbType.Int, 0, 0, 10, true, "SCOPE_IDENTITY()", null, typeof(System.Int32), 0 );
			base.AddElementFieldMapping( "GalleryCategoryEntity", "CatogeryName", "CatogeryName", true, (int)SqlDbType.NVarChar, 500, 0, 0, false, "", null, typeof(System.String), 1 );
		}
		/// <summary>Inits LanguageEntity's mappings</summary>
		private void InitLanguageEntityMappings()
		{
			base.AddElementMapping( "LanguageEntity", "TuanHuy", @"dbo", "LANGUAGE", 2 );
			base.AddElementFieldMapping( "LanguageEntity", "Id", "ID", false, (int)SqlDbType.Decimal, 0, 0, 10, false, "", null, typeof(System.Decimal), 0 );
			base.AddElementFieldMapping( "LanguageEntity", "Language", "LANGUAGE", false, (int)SqlDbType.NChar, 50, 0, 0, false, "", null, typeof(System.String), 1 );
		}
		/// <summary>Inits ProductsEntity's mappings</summary>
		private void InitProductsEntityMappings()
		{
			base.AddElementMapping( "ProductsEntity", "TuanHuy", @"dbo", "Products", 2 );
			base.AddElementFieldMapping( "ProductsEntity", "ProductId", "ProductId", false, (int)SqlDbType.Decimal, 0, 0, 10, true, "SCOPE_IDENTITY()", null, typeof(System.Decimal), 0 );
			base.AddElementFieldMapping( "ProductsEntity", "CreateDate", "CreateDate", true, (int)SqlDbType.DateTime, 0, 0, 0, false, "", null, typeof(System.DateTime), 1 );
		}
		/// <summary>Inits ProductsLanguageEntity's mappings</summary>
		private void InitProductsLanguageEntityMappings()
		{
			base.AddElementMapping( "ProductsLanguageEntity", "TuanHuy", @"dbo", "ProductsLanguage", 9 );
			base.AddElementFieldMapping( "ProductsLanguageEntity", "Id", "ID", false, (int)SqlDbType.Decimal, 0, 0, 10, true, "SCOPE_IDENTITY()", null, typeof(System.Decimal), 0 );
			base.AddElementFieldMapping( "ProductsLanguageEntity", "ProductId", "ProductId", true, (int)SqlDbType.Decimal, 0, 0, 10, false, "", null, typeof(System.Decimal), 1 );
			base.AddElementFieldMapping( "ProductsLanguageEntity", "CategoryId", "CategoryId", true, (int)SqlDbType.Int, 0, 0, 10, false, "", null, typeof(System.Int32), 2 );
			base.AddElementFieldMapping( "ProductsLanguageEntity", "LanguageId", "LanguageId", true, (int)SqlDbType.Decimal, 0, 0, 10, false, "", null, typeof(System.Decimal), 3 );
			base.AddElementFieldMapping( "ProductsLanguageEntity", "ProductName", "ProductName", true, (int)SqlDbType.NVarChar, 250, 0, 0, false, "", null, typeof(System.String), 4 );
			base.AddElementFieldMapping( "ProductsLanguageEntity", "Descriptions", "Descriptions", true, (int)SqlDbType.NVarChar, 500, 0, 0, false, "", null, typeof(System.String), 5 );
			base.AddElementFieldMapping( "ProductsLanguageEntity", "Price", "Price", true, (int)SqlDbType.Float, 0, 0, 38, false, "", null, typeof(System.Double), 6 );
			base.AddElementFieldMapping( "ProductsLanguageEntity", "Image", "Image", true, (int)SqlDbType.NVarChar, 500, 0, 0, false, "", null, typeof(System.String), 7 );
			base.AddElementFieldMapping( "ProductsLanguageEntity", "Content", "CONTENT", true, (int)SqlDbType.NVarChar, 2147483647, 0, 0, false, "", null, typeof(System.String), 8 );
		}
		/// <summary>Inits ProjectCatogeryEntity's mappings</summary>
		private void InitProjectCatogeryEntityMappings()
		{
			base.AddElementMapping( "ProjectCatogeryEntity", "TuanHuy", @"dbo", "ProjectCatogery", 2 );
			base.AddElementFieldMapping( "ProjectCatogeryEntity", "CatogeryId", "CatogeryId", false, (int)SqlDbType.Int, 0, 0, 10, true, "SCOPE_IDENTITY()", null, typeof(System.Int32), 0 );
			base.AddElementFieldMapping( "ProjectCatogeryEntity", "CatogeryName", "CatogeryName", true, (int)SqlDbType.NVarChar, 250, 0, 0, false, "", null, typeof(System.String), 1 );
		}
		/// <summary>Inits ProjectsEntity's mappings</summary>
		private void InitProjectsEntityMappings()
		{
			base.AddElementMapping( "ProjectsEntity", "TuanHuy", @"dbo", "Projects", 2 );
			base.AddElementFieldMapping( "ProjectsEntity", "ProjectId", "ProjectId", false, (int)SqlDbType.Decimal, 0, 0, 10, true, "SCOPE_IDENTITY()", null, typeof(System.Decimal), 0 );
			base.AddElementFieldMapping( "ProjectsEntity", "CreateDate", "CreateDate", true, (int)SqlDbType.DateTime, 0, 0, 0, false, "", null, typeof(System.DateTime), 1 );
		}
		/// <summary>Inits ProjectsLanguageEntity's mappings</summary>
		private void InitProjectsLanguageEntityMappings()
		{
			base.AddElementMapping( "ProjectsLanguageEntity", "TuanHuy", @"dbo", "ProjectsLanguage", 8 );
			base.AddElementFieldMapping( "ProjectsLanguageEntity", "Id", "ID", false, (int)SqlDbType.Decimal, 0, 0, 18, true, "SCOPE_IDENTITY()", null, typeof(System.Decimal), 0 );
			base.AddElementFieldMapping( "ProjectsLanguageEntity", "ProjectId", "ProjectID", true, (int)SqlDbType.Decimal, 0, 0, 10, false, "", null, typeof(System.Decimal), 1 );
			base.AddElementFieldMapping( "ProjectsLanguageEntity", "LanguageId", "LanguageId", true, (int)SqlDbType.NChar, 10, 0, 0, false, "", null, typeof(System.String), 2 );
			base.AddElementFieldMapping( "ProjectsLanguageEntity", "CategoryId", "CategoryId", true, (int)SqlDbType.Int, 0, 0, 10, false, "", null, typeof(System.Int32), 3 );
			base.AddElementFieldMapping( "ProjectsLanguageEntity", "Name", "Name", true, (int)SqlDbType.NVarChar, 250, 0, 0, false, "", null, typeof(System.String), 4 );
			base.AddElementFieldMapping( "ProjectsLanguageEntity", "Descriptions", "Descriptions", true, (int)SqlDbType.NVarChar, 2147483647, 0, 0, false, "", null, typeof(System.String), 5 );
			base.AddElementFieldMapping( "ProjectsLanguageEntity", "Image", "Image", true, (int)SqlDbType.NVarChar, 250, 0, 0, false, "", null, typeof(System.String), 6 );
			base.AddElementFieldMapping( "ProjectsLanguageEntity", "Content", "Content", true, (int)SqlDbType.NVarChar, 2147483647, 0, 0, false, "", null, typeof(System.String), 7 );
		}

	}
}













